﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum AudioClipType
{
    DIE,
    HIT,
    POINT,
    WING
}

public class AudioManager : MonoBehaviour
{
    public static AudioManager _instance;
    public AudioClip[] allAudioClips;
    public AudioSource audioSourceBG;
    public AudioSource audioSourceOther;

	// Use this for initialization
	void Start ()
    {
        _instance = this;
	}
	
	public void SetAudio(AudioClipType index)
    {
        if (GameServer.getSingleton().ismute)
        {
            return;
        }
        audioSourceOther.clip = allAudioClips[(int)index];
        audioSourceOther.Play();
    }
}
